use "PATH(zip_RESTS_CBB_PPP_gini_CBP_County_FULL_210114_with_all_micro_PPP.dta)", clear
encode size, generate(sizeFE)
encode lender, generate(lenderFE)
encode stateabbrev, generate(stateFE)
generate log_parent_size = ln(parent_location_count)
generate log_brand_size = ln(revised_brand_count)
generate log_loan_amt = ln(CurrentApprovalAmount)
generate log_time_from_PPP = ln(time_to_PPP)

sort BorrowerZip BorrowerAddress

keep if PPP_add_matches == 1

local food_types Gastropubs_dummy Hot_Dogs_dummy Gluten_Free_dummy Breakfast___Brunch_dummy Mexican_dummy American_New_dummy Barbeque_dummy Music_Venues_dummy Beer_Bar_dummy Restaurants_dummy Food_Stands_dummy Mediterranean_dummy Hawaiian_dummy Lounges_dummy Seafood_dummy Food_Trucks_dummy Fast_Food_dummy Southern_dummy Vietnamese_dummy Soup_dummy Soul_Food_dummy Cocktail_Bars_dummy Ramen_dummy Comfort_Food_dummy French_dummy Japanese_dummy Sports_Bars_dummy Cheesesteaks_dummy Salad_dummy Grocery_dummy Bakeries_dummy Greek_dummy Korean_dummy Latin_American_dummy Tacos_dummy Vegetarian_dummy Vegan_dummy Middle_Eastern_dummy Pizza_dummy Convenience_Stores_dummy Tex_Mex_dummy Desserts_dummy Bagels_dummy Asian_Fusion_dummy Cafes_dummy Burgers_dummy Wine___Spirits_dummy Ice_Cream___Frozen_Yogurt_dummy Cuban_dummy Chinese_dummy Sushi_Bars_dummy Caribbean_dummy Juice_Bars___Smoothies_dummy Bars_dummy Chicken_Shop_dummy Chicken_Wings_dummy Venues___Event_Spaces_dummy Delis_dummy Indian_dummy Sandwiches_dummy Beer_dummy Noodles_dummy Pubs_dummy Halal_dummy Coffee___Tea_dummy Wraps_dummy Gas_Stations_dummy Wine_Bars_dummy Cajun_Creole_dummy Diners_dummy American_Traditional_dummy Italian_dummy Caterers_dummy Thai_dummy Steakhouses_dummy Buffets_dummy Tapas_Small_Plates_dummy

local food_types_2 American_Traditional_dummy Mexican_dummy Seafood_dummy Italian_dummy American_New_dummy Chinese_dummy Barbeque_dummy Sushi_Bars_dummy Japanese_dummy Sports_Bars_dummy

local food_types_3 Fast_Food_dummy Gastropubs_dummy Cocktail_Bars_dummy Sports_Bars_dummy Cafes_dummy Pubs_dummy Coffee___Tea_dummy Wine_Bars_dummy Venues___Event_Spaces_dummy Beer_Bar_dummy Food_Stands_dummy Lounges_dummy Food_Trucks_dummy Bars_dummy Diners_dummy Steakhouses_dummy

local food_types_3_no_FF Gastropubs_dummy Cocktail_Bars_dummy Sports_Bars_dummy Cafes_dummy Pubs_dummy Coffee___Tea_dummy Wine_Bars_dummy Venues___Event_Spaces_dummy Beer_Bar_dummy Food_Stands_dummy Lounges_dummy Food_Trucks_dummy Bars_dummy Diners_dummy Steakhouses_dummy

reghdfe PPPE_num_all Public_Firm bayes_rating top100_FF ///
log_age c.log_brand_size log_loan_amt log_time_from_PPP ///
`food_types_3_no_FF' ///
[aw = food_service_est_y], baselevels ///
absorb(BorrowerZip) vce(cluster BorrowerZip)

reghdfe diff_PPPE_amt_num Public_Firm bayes_rating top100_FF ///
log_age c.log_brand_size log_loan_amt log_time_from_PPP ///
`food_types_3_no_FF' ///
[aw = food_service_est_y], baselevels ///
absorb(BorrowerZip) vce(cluster BorrowerZip)

reghdfe PPPE_num_all Public_Firm bayes_rating top100_FF ///
log_age log_loan_amt log_time_from_PPP ///
`food_types_3_no_FF' ///
[aw = food_service_est_y], baselevels ///
absorb(BorrowerZip) vce(cluster BorrowerZip)

reghdfe diff_PPPE_amt_num Public_Firm bayes_rating top100_FF ///
log_age log_loan_amt log_time_from_PPP ///
`food_types_3_no_FF' ///
[aw = food_service_est_y], baselevels ///
absorb(BorrowerZip) vce(cluster BorrowerZip)
